<% @action_specific_js = ['tiny_mce/tiny_mce.js']%>

<p>您可以上传一个头像图片（图片将会被自动显示为150像素大小）：</p>
<%= form_tag({:action => 'upload_picture'}, :multipart => true) %>
	<label for="profile_picture">头像图片: </label>
	<%= file_field 'profile', 'picture', 'size' => 30 %>
	<%= submit_tag "上传" %><br/>
<%= end_form_tag %>

<div class="picture">
<% image_url = pick_portrait_image_file_url(session[:user])%>
<% if !image_url.nil?%>
	<%= tag "img", :src => image_url%>
<% end%>
</div>

<script language="javascript" type="text/javascript">
	tinyMCE.init({
		mode : "textareas",
		theme : "simple"
	});
</script>

<p>更新您的个人信息：</p>
<%= form_tag :action => "update"%>
	<label for="profile_name">姓名: </label>
	<%= text_field 'profile', 'name' %><br/>
	
	<label for="profile_location">地址: </label>
	<%= text_field 'profile', 'location' %><br/>
	
	<label for="profile_biography">个人简介: </label>
	<%= text_area 'profile', 'biography', "cols" => 80, "rows" => 20 %><br/>
	
	<label></label>
	<%= submit_tag '更新', :id => 'update_profile' %>
<%= end_form_tag%>
